package cn.com.haopy.dataes.db.entity.main;

import cn.com.haopy.dataes.db.entity.MainBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.time.LocalDateTime;

/**
 * @author keel
 */

@Data
@TableName(value = "`hd_app`", autoResultMap = true)
@ApiModel(value = "接入应用")
public class HDApp extends MainBaseEntity {
    @TableField(value = "`code`", jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "编码")
    String code;

    @TableField(value = "`name`", jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "应用名称")
    String name;

    @TableField(value = "`private_key`", jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "应用数据签名key")
    String privateKey;

    @TableField(value = "`key`", jdbcType = JdbcType.VARCHAR)
    @ApiModelProperty(value = "应用数据验签key")
    String key;

    @TableField(value = "`start`", jdbcType = JdbcType.TIMESTAMP)
    @ApiModelProperty(value = "授权开始时间")
    LocalDateTime start;

    @TableField(value = "`end`", jdbcType = JdbcType.TIMESTAMP)
    @ApiModelProperty(value = "授权结束时间")
    LocalDateTime end;

    @TableField(value = "`enabled`", jdbcType = JdbcType.TINYINT)
    @ApiModelProperty(value = "是否可用")
    Boolean enabled;
}
